﻿using System;
using System.Collections.Generic;
using System.Reflection;
using TaleWorlds.Library;

namespace TaleWorlds.SaveSystem.Definition
{
	// Token: 0x02000059 RID: 89
	public class DefinitionContext
	{
		// Token: 0x1700006F RID: 111
		// (get) Token: 0x060002A5 RID: 677 RVA: 0x0000B002 File Offset: 0x00009202
		public bool GotError
		{
			get
			{
				return this._errors.Count > 0;
			}
		}

		// Token: 0x17000070 RID: 112
		// (get) Token: 0x060002A6 RID: 678 RVA: 0x0000B012 File Offset: 0x00009212
		public IEnumerable<string> Errors
		{
			get
			{
				return this._errors.AsReadOnly();
			}
		}

		// Token: 0x060002A7 RID: 679 RVA: 0x0000B020 File Offset: 0x00009220
		public DefinitionContext()
		{
			this._errors = new List<string>();
			this._rootClassDefinitions = new Dictionary<Type, TypeDefinition>();
			this._classDefinitions = new Dictionary<Type, TypeDefinition>();
			this._classDefinitionsWithId = new Dictionary<SaveId, TypeDefinition>();
			this._interfaceDefinitions = new Dictionary<Type, InterfaceDefinition>();
			this._interfaceDefinitionsWithId = new Dictionary<SaveId, InterfaceDefinition>();
			this._enumDefinitions = new Dictionary<Type, EnumDefinition>();
			this._enumDefinitionsWithId = new Dictionary<SaveId, EnumDefinition>();
			this._containerDefinitions = new Dictionary<Type, ContainerDefinition>();
			this._containerDefinitionsWithId = new Dictionary<SaveId, ContainerDefinition>();
			this._genericClassDefinitions = new Dictionary<Type, GenericTypeDefinition>();
			this._structDefinitions = new Dictionary<Type, StructDefinition>();
			this._structDefinitionsWithId = new Dictionary<SaveId, StructDefinition>();
			this._genericStructDefinitions = new Dictionary<Type, GenericTypeDefinition>();
			this._basicTypeDefinitions = new Dictionary<Type, BasicTypeDefinition>();
			this._basicTypeDefinitionsWithId = new Dictionary<SaveId, BasicTypeDefinition>();
			this._allTypeDefinitions = new Dictionary<Type, TypeDefinitionBase>();
			this._allTypeDefinitionsWithId = new Dictionary<SaveId, TypeDefinitionBase>();
			this._saveableTypeDefiners = new List<SaveableTypeDefiner>();
			this._autoGeneratedSaveManagers = new List<IAutoGeneratedSaveManager>();
		}

		// Token: 0x060002A8 RID: 680 RVA: 0x0000B10F File Offset: 0x0000930F
		internal void AddRootClassDefinition(TypeDefinition rootClassDefinition)
		{
			this._rootClassDefinitions.Add(rootClassDefinition.Type, rootClassDefinition);
			this._allTypeDefinitions.Add(rootClassDefinition.Type, rootClassDefinition);
			this._allTypeDefinitionsWithId.Add(rootClassDefinition.SaveId, rootClassDefinition);
		}

		// Token: 0x060002A9 RID: 681 RVA: 0x0000B148 File Offset: 0x00009348
		internal void AddClassDefinition(TypeDefinition classDefinition)
		{
			this._classDefinitions.Add(classDefinition.Type, classDefinition);
			this._classDefinitionsWithId.Add(classDefinition.SaveId, classDefinition);
			this._allTypeDefinitions.Add(classDefinition.Type, classDefinition);
			this._allTypeDefinitionsWithId.Add(classDefinition.SaveId, classDefinition);
		}

		// Token: 0x060002AA RID: 682 RVA: 0x0000B1A0 File Offset: 0x000093A0
		internal void AddStructDefinition(StructDefinition structDefinition)
		{
			this._structDefinitions.Add(structDefinition.Type, structDefinition);
			this._structDefinitionsWithId.Add(structDefinition.SaveId, structDefinition);
			this._allTypeDefinitions.Add(structDefinition.Type, structDefinition);
			this._allTypeDefinitionsWithId.Add(structDefinition.SaveId, structDefinition);
		}

		// Token: 0x060002AB RID: 683 RVA: 0x0000B1F8 File Offset: 0x000093F8
		internal void AddInterfaceDefinition(InterfaceDefinition interfaceDefinition)
		{
			this._interfaceDefinitions.Add(interfaceDefinition.Type, interfaceDefinition);
			this._interfaceDefinitionsWithId.Add(interfaceDefinition.SaveId, interfaceDefinition);
			this._allTypeDefinitions.Add(interfaceDefinition.Type, interfaceDefinition);
			this._allTypeDefinitionsWithId.Add(interfaceDefinition.SaveId, interfaceDefinition);
		}

		// Token: 0x060002AC RID: 684 RVA: 0x0000B250 File Offset: 0x00009450
		internal void AddEnumDefinition(EnumDefinition enumDefinition)
		{
			this._enumDefinitions.Add(enumDefinition.Type, enumDefinition);
			this._enumDefinitionsWithId.Add(enumDefinition.SaveId, enumDefinition);
			this._allTypeDefinitions.Add(enumDefinition.Type, enumDefinition);
			this._allTypeDefinitionsWithId.Add(enumDefinition.SaveId, enumDefinition);
		}

		// Token: 0x060002AD RID: 685 RVA: 0x0000B2A8 File Offset: 0x000094A8
		internal void AddContainerDefinition(ContainerDefinition containerDefinition)
		{
			this._containerDefinitions.Add(containerDefinition.Type, containerDefinition);
			this._containerDefinitionsWithId.Add(containerDefinition.SaveId, containerDefinition);
			this._allTypeDefinitions.Add(containerDefinition.Type, containerDefinition);
			this._allTypeDefinitionsWithId.Add(containerDefinition.SaveId, containerDefinition);
		}

		// Token: 0x060002AE RID: 686 RVA: 0x0000B300 File Offset: 0x00009500
		internal void AddBasicTypeDefinition(BasicTypeDefinition basicTypeDefinition)
		{
			this._basicTypeDefinitions.Add(basicTypeDefinition.Type, basicTypeDefinition);
			this._basicTypeDefinitionsWithId.Add(basicTypeDefinition.SaveId, basicTypeDefinition);
			this._allTypeDefinitions.Add(basicTypeDefinition.Type, basicTypeDefinition);
			this._allTypeDefinitionsWithId.Add(basicTypeDefinition.SaveId, basicTypeDefinition);
		}

		// Token: 0x060002AF RID: 687 RVA: 0x0000B355 File Offset: 0x00009555
		private void AddGenericClassDefinition(GenericTypeDefinition genericClassDefinition)
		{
			this._genericClassDefinitions.Add(genericClassDefinition.Type, genericClassDefinition);
			this._allTypeDefinitions.Add(genericClassDefinition.Type, genericClassDefinition);
			this._allTypeDefinitionsWithId.Add(genericClassDefinition.SaveId, genericClassDefinition);
		}

		// Token: 0x060002B0 RID: 688 RVA: 0x0000B38D File Offset: 0x0000958D
		private void AddGenericStructDefinition(GenericTypeDefinition genericStructDefinition)
		{
			this._genericStructDefinitions.Add(genericStructDefinition.Type, genericStructDefinition);
			this._allTypeDefinitions.Add(genericStructDefinition.Type, genericStructDefinition);
			this._allTypeDefinitionsWithId.Add(genericStructDefinition.SaveId, genericStructDefinition);
		}

		// Token: 0x060002B1 RID: 689 RVA: 0x0000B3C8 File Offset: 0x000095C8
		public void FillWithCurrentTypes()
		{
			this._assemblies = this.GetSaveableAssemblies();
			foreach (Assembly assembly in this._assemblies)
			{
				this.CollectTypes(assembly);
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner in this._saveableTypeDefiners)
			{
				saveableTypeDefiner.Initialize(this);
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner2 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner2.DefineBasicTypes();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner3 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner3.DefineClassTypes();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner4 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner4.DefineStructTypes();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner5 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner5.DefineInterfaceTypes();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner6 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner6.DefineEnumTypes();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner7 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner7.DefineRootClassTypes();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner8 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner8.DefineGenericStructDefinitions();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner9 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner9.DefineGenericClassDefinitions();
			}
			foreach (SaveableTypeDefiner saveableTypeDefiner10 in this._saveableTypeDefiners)
			{
				saveableTypeDefiner10.DefineContainerDefinitions();
			}
			foreach (TypeDefinition typeDefinition in this._rootClassDefinitions.Values)
			{
				typeDefinition.CollectInitializationCallbacks();
				typeDefinition.CollectProperties();
				typeDefinition.CollectFields();
			}
			TWParallel.ForEach<TypeDefinition>(this._classDefinitions.Values, delegate(TypeDefinition classDefinition)
			{
				classDefinition.CollectInitializationCallbacks();
				classDefinition.CollectProperties();
				classDefinition.CollectFields();
			});
			foreach (TypeDefinition typeDefinition2 in this._classDefinitions.Values)
			{
				this._errors.AddRange(typeDefinition2.Errors);
			}
			TWParallel.ForEach<StructDefinition>(this._structDefinitions.Values, delegate(StructDefinition structDefinitions)
			{
				structDefinitions.CollectProperties();
				structDefinitions.CollectFields();
			});
			foreach (StructDefinition structDefinition in this._structDefinitions.Values)
			{
				this._errors.AddRange(structDefinition.Errors);
			}
			this.FindAutoGeneratedSaveManagers();
			this.InitializeAutoGeneratedSaveManagers();
		}

		// Token: 0x060002B2 RID: 690 RVA: 0x0000B7E4 File Offset: 0x000099E4
		private Assembly[] GetSaveableAssemblies()
		{
			List<Assembly> list = new List<Assembly>();
			Assembly assembly = typeof(SaveableRootClassAttribute).Assembly;
			Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
			list.Add(assembly);
			foreach (Assembly assembly2 in assemblies)
			{
				if (assembly2 != assembly)
				{
					AssemblyName[] referencedAssemblies = assembly2.GetReferencedAssemblies();
					for (int j = 0; j < referencedAssemblies.Length; j++)
					{
						if (referencedAssemblies[j].ToString() == assembly.GetName().ToString())
						{
							list.Add(assembly2);
							break;
						}
					}
				}
			}
			return list.ToArray();
		}

		// Token: 0x060002B3 RID: 691 RVA: 0x0000B880 File Offset: 0x00009A80
		private void CollectTypes(Assembly assembly)
		{
			foreach (Type type in assembly.GetTypesSafe(null))
			{
				if (typeof(SaveableTypeDefiner).IsAssignableFrom(type) && !type.IsAbstract)
				{
					SaveableTypeDefiner item = (SaveableTypeDefiner)Activator.CreateInstance(type);
					this._saveableTypeDefiners.Add(item);
				}
			}
		}

		// Token: 0x060002B4 RID: 692 RVA: 0x0000B900 File Offset: 0x00009B00
		internal TypeDefinitionBase GetTypeDefinition(Type type)
		{
			TypeDefinitionBase result;
			if (this._allTypeDefinitions.TryGetValue(type, out result))
			{
				return result;
			}
			return null;
		}

		// Token: 0x060002B5 RID: 693 RVA: 0x0000B920 File Offset: 0x00009B20
		internal TypeDefinition GetClassDefinition(Type type)
		{
			if (type.IsContainer())
			{
				return null;
			}
			TypeDefinition result;
			if (this._rootClassDefinitions.TryGetValue(type, out result))
			{
				return result;
			}
			GenericTypeDefinition result2;
			if (this._genericClassDefinitions.TryGetValue(type, out result2))
			{
				return result2;
			}
			TypeDefinition result3;
			if (this._classDefinitions.TryGetValue(type, out result3))
			{
				return result3;
			}
			return null;
		}

		// Token: 0x060002B6 RID: 694 RVA: 0x0000B970 File Offset: 0x00009B70
		public TypeDefinitionBase TryGetTypeDefinition(SaveId saveId)
		{
			TypeDefinitionBase result;
			if (this._allTypeDefinitionsWithId.TryGetValue(saveId, out result))
			{
				return result;
			}
			if (saveId is GenericSaveId)
			{
				GenericSaveId genericSaveId = (GenericSaveId)saveId;
				SaveId baseId = genericSaveId.BaseId;
				TypeDefinition typeDefinition = this.TryGetTypeDefinition(baseId) as TypeDefinition;
				if (typeDefinition != null)
				{
					TypeDefinitionBase[] array = new TypeDefinitionBase[genericSaveId.GenericTypeIDs.Length];
					for (int i = 0; i < genericSaveId.GenericTypeIDs.Length; i++)
					{
						SaveId saveId2 = genericSaveId.GenericTypeIDs[i];
						TypeDefinitionBase typeDefinitionBase = this.TryGetTypeDefinition(saveId2);
						if (typeDefinitionBase == null)
						{
							return null;
						}
						array[i] = typeDefinitionBase;
					}
					Type type = this.ConstructTypeFrom(typeDefinition, array);
					if (type != null)
					{
						GenericTypeDefinition genericTypeDefinition = new GenericTypeDefinition(type, genericSaveId);
						genericTypeDefinition.CollectInitializationCallbacks();
						genericTypeDefinition.CollectFields();
						genericTypeDefinition.CollectProperties();
						if (genericTypeDefinition.IsClassDefinition)
						{
							if (!this._allTypeDefinitions.ContainsKey(genericTypeDefinition.Type))
							{
								this.AddGenericClassDefinition(genericTypeDefinition);
							}
						}
						else
						{
							this.AddGenericStructDefinition(genericTypeDefinition);
						}
						return genericTypeDefinition;
					}
				}
			}
			return null;
		}

		// Token: 0x060002B7 RID: 695 RVA: 0x0000BA6C File Offset: 0x00009C6C
		internal GenericTypeDefinition ConstructGenericClassDefinition(Type type)
		{
			Type genericTypeDefinition = type.GetGenericTypeDefinition();
			TypeDefinition classDefinition = this.GetClassDefinition(genericTypeDefinition);
			TypeSaveId baseId = (TypeSaveId)classDefinition.SaveId;
			SaveId[] array = new SaveId[type.GenericTypeArguments.Length];
			for (int i = 0; i < type.GenericTypeArguments.Length; i++)
			{
				Type type2 = type.GenericTypeArguments[i];
				TypeDefinitionBase typeDefinition = this.GetTypeDefinition(type2);
				array[i] = typeDefinition.SaveId;
			}
			GenericSaveId saveId = new GenericSaveId(baseId, array);
			GenericTypeDefinition genericTypeDefinition2 = new GenericTypeDefinition(type, saveId);
			foreach (CustomField customField in classDefinition.CustomFields)
			{
				genericTypeDefinition2.AddCustomField(customField.Name, customField.SaveId);
			}
			genericTypeDefinition2.CollectInitializationCallbacks();
			genericTypeDefinition2.CollectFields();
			genericTypeDefinition2.CollectProperties();
			this.AddGenericClassDefinition(genericTypeDefinition2);
			return genericTypeDefinition2;
		}

		// Token: 0x060002B8 RID: 696 RVA: 0x0000BB64 File Offset: 0x00009D64
		internal bool HasDefinition(Type type)
		{
			return this._allTypeDefinitions.ContainsKey(type);
		}

		// Token: 0x060002B9 RID: 697 RVA: 0x0000BB74 File Offset: 0x00009D74
		internal ContainerDefinition ConstructContainerDefinition(Type type, Assembly definedAssembly)
		{
			ContainerType containerType;
			type.IsContainer(out containerType);
			SaveId keyId = null;
			SaveId valueId = null;
			if (containerType == ContainerType.List || containerType == ContainerType.CustomList || containerType == ContainerType.CustomReadOnlyList || containerType == ContainerType.Queue)
			{
				Type type2 = type.GenericTypeArguments[0];
				keyId = this.GetTypeDefinition(type2).SaveId;
			}
			else if (containerType == ContainerType.Dictionary)
			{
				Type type3 = type.GenericTypeArguments[0];
				keyId = this.GetTypeDefinition(type3).SaveId;
				Type type4 = type.GenericTypeArguments[1];
				valueId = this.GetTypeDefinition(type4).SaveId;
			}
			else if (containerType == ContainerType.Array)
			{
				Type elementType = type.GetElementType();
				keyId = this.GetTypeDefinition(elementType).SaveId;
			}
			ContainerSaveId saveId = new ContainerSaveId(containerType, keyId, valueId);
			ContainerDefinition containerDefinition = new ContainerDefinition(type, saveId, definedAssembly);
			this.AddContainerDefinition(containerDefinition);
			if (containerType == ContainerType.List)
			{
				this.AddContainerDefinition(new ContainerDefinition(typeof(MBList<>).MakeGenericType(type.GetGenericArguments()), new ContainerSaveId(ContainerType.CustomList, keyId, valueId), definedAssembly));
				this.AddContainerDefinition(new ContainerDefinition(typeof(MBReadOnlyList<>).MakeGenericType(type.GetGenericArguments()), new ContainerSaveId(ContainerType.CustomReadOnlyList, keyId, valueId), definedAssembly));
			}
			return containerDefinition;
		}

		// Token: 0x060002BA RID: 698 RVA: 0x0000BC7C File Offset: 0x00009E7C
		private Type ConstructTypeFrom(TypeDefinition baseClassDefinition, TypeDefinitionBase[] parameterDefinitions)
		{
			Type type = baseClassDefinition.Type;
			Type[] array = new Type[parameterDefinitions.Length];
			for (int i = 0; i < parameterDefinitions.Length; i++)
			{
				Type type2 = parameterDefinitions[i].Type;
				if (type2 == null)
				{
					return null;
				}
				array[i] = type2;
			}
			return type.MakeGenericType(array);
		}

		// Token: 0x060002BB RID: 699 RVA: 0x0000BCC8 File Offset: 0x00009EC8
		internal TypeDefinition GetStructDefinition(Type type)
		{
			GenericTypeDefinition result;
			if (this._genericStructDefinitions.TryGetValue(type, out result))
			{
				return result;
			}
			StructDefinition result2;
			if (this._structDefinitions.TryGetValue(type, out result2))
			{
				return result2;
			}
			return null;
		}

		// Token: 0x060002BC RID: 700 RVA: 0x0000BCFC File Offset: 0x00009EFC
		internal InterfaceDefinition GetInterfaceDefinition(Type type)
		{
			InterfaceDefinition result;
			this._interfaceDefinitions.TryGetValue(type, out result);
			return result;
		}

		// Token: 0x060002BD RID: 701 RVA: 0x0000BD1C File Offset: 0x00009F1C
		internal EnumDefinition GetEnumDefinition(Type type)
		{
			EnumDefinition result;
			this._enumDefinitions.TryGetValue(type, out result);
			return result;
		}

		// Token: 0x060002BE RID: 702 RVA: 0x0000BD3C File Offset: 0x00009F3C
		internal ContainerDefinition GetContainerDefinition(Type type)
		{
			ContainerDefinition result;
			this._containerDefinitions.TryGetValue(type, out result);
			return result;
		}

		// Token: 0x060002BF RID: 703 RVA: 0x0000BD5C File Offset: 0x00009F5C
		internal GenericTypeDefinition ConstructGenericStructDefinition(Type type)
		{
			Type genericTypeDefinition = type.GetGenericTypeDefinition();
			TypeDefinition structDefinition = this.GetStructDefinition(genericTypeDefinition);
			TypeSaveId baseId = (TypeSaveId)structDefinition.SaveId;
			SaveId[] array = new SaveId[type.GenericTypeArguments.Length];
			for (int i = 0; i < type.GenericTypeArguments.Length; i++)
			{
				Type type2 = type.GenericTypeArguments[i];
				TypeDefinitionBase typeDefinition = this.GetTypeDefinition(type2);
				array[i] = typeDefinition.SaveId;
			}
			GenericSaveId saveId = new GenericSaveId(baseId, array);
			GenericTypeDefinition genericTypeDefinition2 = new GenericTypeDefinition(type, saveId);
			foreach (CustomField customField in structDefinition.CustomFields)
			{
				genericTypeDefinition2.AddCustomField(customField.Name, customField.SaveId);
			}
			genericTypeDefinition2.CollectFields();
			genericTypeDefinition2.CollectProperties();
			this.AddGenericStructDefinition(genericTypeDefinition2);
			return genericTypeDefinition2;
		}

		// Token: 0x060002C0 RID: 704 RVA: 0x0000BE4C File Offset: 0x0000A04C
		internal BasicTypeDefinition GetBasicTypeDefinition(Type type)
		{
			BasicTypeDefinition result;
			this._basicTypeDefinitions.TryGetValue(type, out result);
			return result;
		}

		// Token: 0x060002C1 RID: 705 RVA: 0x0000BE6C File Offset: 0x0000A06C
		private void FindAutoGeneratedSaveManagers()
		{
			Assembly[] assemblies = this._assemblies;
			for (int i = 0; i < assemblies.Length; i++)
			{
				foreach (Type type in assemblies[i].GetTypesSafe(null))
				{
					if (typeof(IAutoGeneratedSaveManager).IsAssignableFrom(type) && typeof(IAutoGeneratedSaveManager) != type)
					{
						IAutoGeneratedSaveManager item = (IAutoGeneratedSaveManager)Activator.CreateInstance(type);
						this._autoGeneratedSaveManagers.Add(item);
					}
				}
			}
		}

		// Token: 0x060002C2 RID: 706 RVA: 0x0000BF10 File Offset: 0x0000A110
		private void InitializeAutoGeneratedSaveManagers()
		{
			foreach (IAutoGeneratedSaveManager autoGeneratedSaveManager in this._autoGeneratedSaveManagers)
			{
				autoGeneratedSaveManager.Initialize(this);
			}
		}

		// Token: 0x060002C3 RID: 707 RVA: 0x0000BF64 File Offset: 0x0000A164
		public void GenerateCode(SaveCodeGenerationContext context)
		{
			foreach (TypeDefinition typeDefinition in this._classDefinitions.Values)
			{
				Assembly assembly = typeDefinition.Type.Assembly;
				SaveCodeGenerationContextAssembly saveCodeGenerationContextAssembly = context.FindAssemblyInformation(assembly);
				if (saveCodeGenerationContextAssembly != null)
				{
					saveCodeGenerationContextAssembly.AddClassDefinition(typeDefinition);
				}
			}
			foreach (StructDefinition structDefinition in this._structDefinitions.Values)
			{
				Assembly assembly2 = structDefinition.Type.Assembly;
				SaveCodeGenerationContextAssembly saveCodeGenerationContextAssembly2 = context.FindAssemblyInformation(assembly2);
				if (saveCodeGenerationContextAssembly2 != null)
				{
					saveCodeGenerationContextAssembly2.AddStructDefinition(structDefinition);
				}
			}
			foreach (ContainerDefinition containerDefinition in this._containerDefinitions.Values)
			{
				Assembly definedAssembly = containerDefinition.DefinedAssembly;
				SaveCodeGenerationContextAssembly saveCodeGenerationContextAssembly3 = context.FindAssemblyInformation(definedAssembly);
				if (saveCodeGenerationContextAssembly3 != null)
				{
					saveCodeGenerationContextAssembly3.AddContainerDefinition(containerDefinition);
				}
			}
			context.FillFiles();
		}

		// Token: 0x040000CB RID: 203
		private Dictionary<Type, TypeDefinition> _rootClassDefinitions;

		// Token: 0x040000CC RID: 204
		private Dictionary<Type, TypeDefinition> _classDefinitions;

		// Token: 0x040000CD RID: 205
		private Dictionary<SaveId, TypeDefinition> _classDefinitionsWithId;

		// Token: 0x040000CE RID: 206
		private Dictionary<Type, InterfaceDefinition> _interfaceDefinitions;

		// Token: 0x040000CF RID: 207
		private Dictionary<SaveId, InterfaceDefinition> _interfaceDefinitionsWithId;

		// Token: 0x040000D0 RID: 208
		private Dictionary<Type, EnumDefinition> _enumDefinitions;

		// Token: 0x040000D1 RID: 209
		private Dictionary<SaveId, EnumDefinition> _enumDefinitionsWithId;

		// Token: 0x040000D2 RID: 210
		private Dictionary<Type, ContainerDefinition> _containerDefinitions;

		// Token: 0x040000D3 RID: 211
		private Dictionary<SaveId, ContainerDefinition> _containerDefinitionsWithId;

		// Token: 0x040000D4 RID: 212
		private Dictionary<Type, GenericTypeDefinition> _genericClassDefinitions;

		// Token: 0x040000D5 RID: 213
		private Dictionary<Type, StructDefinition> _structDefinitions;

		// Token: 0x040000D6 RID: 214
		private Dictionary<SaveId, StructDefinition> _structDefinitionsWithId;

		// Token: 0x040000D7 RID: 215
		private Dictionary<Type, GenericTypeDefinition> _genericStructDefinitions;

		// Token: 0x040000D8 RID: 216
		private Dictionary<Type, BasicTypeDefinition> _basicTypeDefinitions;

		// Token: 0x040000D9 RID: 217
		private Dictionary<SaveId, BasicTypeDefinition> _basicTypeDefinitionsWithId;

		// Token: 0x040000DA RID: 218
		private Dictionary<Type, TypeDefinitionBase> _allTypeDefinitions;

		// Token: 0x040000DB RID: 219
		private Dictionary<SaveId, TypeDefinitionBase> _allTypeDefinitionsWithId;

		// Token: 0x040000DC RID: 220
		private List<IAutoGeneratedSaveManager> _autoGeneratedSaveManagers;

		// Token: 0x040000DD RID: 221
		private Assembly[] _assemblies;

		// Token: 0x040000DE RID: 222
		public List<string> _errors;

		// Token: 0x040000DF RID: 223
		private List<SaveableTypeDefiner> _saveableTypeDefiners;
	}
}
